import request from "@/utils/request";

// 查询活动页列表
export function listCampaignPage(query) {
  return request({
    url: "/decor/campaignPage/list",
    method: "get",
    params: query,
  });
}

// 查询活动页详细
export function getCampaignPage(campaignPageId) {
  return request({
    url: "/decor/campaignPage/" + campaignPageId,
    method: "get",
  });
}

// 新增活动页
export function addCampaignPage(data) {
  return request({
    url: "/decor/campaignPage",
    method: "post",
    data: data,
  });
}

// 修改活动页
export function updateCampaignPage(data) {
  return request({
    url: "/decor/campaignPage",
    method: "put",
    data: data,
  });
}

// 删除活动页
export function delCampaignPage(campaignPageId) {
  return request({
    url: "/decor/campaignPage/" + campaignPageId,
    method: "delete",
  });
}
// 查询广告列表
export function listAds(query) {
  return request({
    url: "/decor/ads/list",
    method: "get",
    params: query,
  });
}

// 查询广告详细
export function getAds(adsId) {
  return request({
    url: "/decor/ads/" + adsId,
    method: "get",
  });
}

// 新增广告
export function addAds(data) {
  return request({
    url: "/decor/ads",
    method: "post",
    data: data,
  });
}

// 修改广告
export function updateAds(data) {
  return request({
    url: "/decor/ads",
    method: "put",
    data: data,
  });
}

// 删除广告
export function delAds(adsId) {
  return request({
    url: "/decor/ads/" + adsId,
    method: "delete",
  });
}
